package com.aaa.ssm.dao;
import com.aaa.ssm.entity.Department;
import com.aaa.ssm.entity.Disease;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface DiseaseDao {
    /**
     * 查询所有
     * @param disease
     * @return
     */
    List<Disease> queryByParam(Disease disease);

    /**
     * 通过Id查找
     * @param diseaseId
     * @return
     */
    Disease queryById(Integer diseaseId);

    /**
     * 添加
     * @param disease
     * @return
     */
    int add(Disease disease);

    /**
     * 更新
     * @param disease
     * @return
     */
    int update(Disease disease);

    /**
     * 删除
     * @param diseaseId
     * @return
     */
    int deleteById(Integer diseaseId);
    List<Disease> queryDisease(Integer departmentId);


    // 获取所有科室信息的接口
    @Select("SELECT department_id departmentId, department_name departmentName FROM sys_department")
    List<Department> getAllDepartments();
}
